import sys

from jobs_agency.basics import DetachedJob


class StoppedJob(DetachedJob):
    def __init__(self, id: str | None = None):
        self._id = id

    @property
    def id(self) -> str:
        return self._id

    def monitor(self):
        print("The job has already terminated. Nothing to monitor.", file=sys.stderr)

    @property
    def active(self) -> bool:
        return False

    def terminate(self):
        print("The job has already terminated.", file=sys.stderr)
